Hello,
Module m = current
m = edit(fullName m, true,true,true)
if (null m){ack "{null} Parameter for current module!";halt;}
if (null current Module) {ack "Please run this program from a module";halt;}
else if (!isEdit current) {ack "current module must be editable to set permissions";halt;}
void inhertTable(Object o)
{
if (table o)
{
Object tbl= getTable (o)
inherited tbl
Object rowHead
for rowHead in table tbl do {inherited rowHead}
}
}
void main(Module m)
{
Object o
for o in entire m do {
string err
err = set(o,read|write|change,null) // null means alter the
inherited o
inhertTable(o)
// default ACL record
if (!null err) {
ack "problem setting default ACL: " err
halt
}
}
}
/*************************************************
MAIN
*************************************************/
main(m)
save(m) // Saving...
close(m) // Closing...
SystemAdmin - Fri Jan 27 10:07:26 EST 2012 |
Re: inheritance and Shareable-Edit???
Its not a "defect" its an "unfortunate design feature" that shareable edit sections are those objects that have "specific" access. So if you have a shareable module and modify the module accesses, its "unfortunate" that the sections don't "inherit" the new accesses.
void Reset(Object obj)
{ bool IsInherited = false
isAccessInherited(obj, IsInherited)
if (!IsInherited and !isDeleted(obj) and canModify(obj))
{ inherited(obj)
specific(obj)
}
Object oChild
for oChild in obj do
{ Reset(oChild) // ** RECURSION **
}
} // end Reset(Obj)
void Reset(Module mod)
{ Object oTop
for oTop in top(mod) do
{ Reset(oTop)
}
} // end Reset(Mod)
Reset(current Module)
|